export class WebUtil {

    public static getIpByExpressReq(req): string {
        let ip = req.headers['X-Real-IP'] || req.connection.remoteAddress
        if (ip.indexOf('::ffff:') != -1) {
            ip = ip.substring(7);
        }
        return ip;
    }
}